3.3.57 \(\int (a+b \sec (c+d x)) \tan ^5(c+d x) \, dx\) [257]

3.3.57.1 Optimal result
3.3.57.2 Mathematica [A] (verified)
3.3.57.3 Rubi [A] (verified)
3.3.57.4 Maple [A] (verified)
3.3.57.5 Fricas [A] (verification not implemented)
3.3.57.6 Sympy [A] (verification not implemented)
3.3.57.7 Maxima [A] (verification not implemented)
3.3.57.8 Giac [B] (verification not implemented)
3.3.57.9 Mupad [B] (verification not implemented)

3.3.57.1 Optimal result

Integrand size = 19, antiderivative size = 84 \[ \int (a+b \sec (c+d x)) \tan ^5(c+d x) \, dx=-\frac {a \log (\cos (c+d x))}{d}+\frac {8 b \sec (c+d x)}{15 d}-\frac {(15 a+8 b \sec (c+d x)) \tan ^2(c+d x)}{30 d}+\frac {(5 a+4 b \sec (c+d x)) \tan ^4(c+d x)}{20 d} \]

output
-a*ln(cos(d*x+c))/d+8/15*b*sec(d*x+c)/d-1/30*(15*a+8*b*sec(d*x+c))*tan(d*x 
+c)^2/d+1/20*(5*a+4*b*sec(d*x+c))*tan(d*x+c)^4/d
 
3.3.57.2 Mathematica [A] (verified)

Time = 0.20 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.98 \[ \int (a+b \sec (c+d x)) \tan ^5(c+d x) \, dx=\frac {b \sec (c+d x)}{d}-\frac {2 b \sec ^3(c+d x)}{3 d}+\frac {b \sec ^5(c+d x)}{5 d}-\frac {a \left (4 \log (\cos (c+d x))+2 \tan ^2(c+d x)-\tan ^4(c+d x)\right )}{4 d} \]

input
Integrate[(a + b*Sec[c + d*x])*Tan[c + d*x]^5,x]
 
output
(b*Sec[c + d*x])/d - (2*b*Sec[c + d*x]^3)/(3*d) + (b*Sec[c + d*x]^5)/(5*d) 
 - (a*(4*Log[Cos[c + d*x]] + 2*Tan[c + d*x]^2 - Tan[c + d*x]^4))/(4*d)
 
3.3.57.3 Rubi [A] (verified)

Time = 0.57 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.10, number of steps used = 17, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.842, Rules used = {3042, 25, 4369, 25, 3042, 25, 4369, 25, 3042, 25, 4372, 25, 3042, 3086, 24, 3956}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \tan ^5(c+d x) (a+b \sec (c+d x)) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int -\cot \left (c+d x+\frac {\pi }{2}\right )^5 \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\int \cot \left (\frac {1}{2} (2 c+\pi )+d x\right )^5 \left (a+b \csc \left (\frac {1}{2} (2 c+\pi )+d x\right )\right )dx\)

\(\Big \downarrow \) 4369

\(\displaystyle \frac {1}{5} \int -\left ((5 a+4 b \sec (c+d x)) \tan ^3(c+d x)\right )dx+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}-\frac {1}{5} \int (5 a+4 b \sec (c+d x)) \tan ^3(c+d x)dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}-\frac {1}{5} \int -\cot \left (c+d x+\frac {\pi }{2}\right )^3 \left (5 a+4 b \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{5} \int \cot \left (\frac {1}{2} (2 c+\pi )+d x\right )^3 \left (5 a+4 b \csc \left (\frac {1}{2} (2 c+\pi )+d x\right )\right )dx+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 4369

\(\displaystyle \frac {1}{5} \left (-\frac {1}{3} \int -((15 a+8 b \sec (c+d x)) \tan (c+d x))dx-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \int (15 a+8 b \sec (c+d x)) \tan (c+d x)dx-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \int -\cot \left (c+d x+\frac {\pi }{2}\right ) \left (15 a+8 b \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{5} \left (-\frac {1}{3} \int \cot \left (\frac {1}{2} (2 c+\pi )+d x\right ) \left (15 a+8 b \csc \left (\frac {1}{2} (2 c+\pi )+d x\right )\right )dx-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 4372

\(\displaystyle \frac {1}{5} \left (\frac {1}{3} (-15 a \int -\tan (c+d x)dx-8 b \int -\sec (c+d x) \tan (c+d x)dx)-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{5} \left (\frac {1}{3} (15 a \int \tan (c+d x)dx+8 b \int \sec (c+d x) \tan (c+d x)dx)-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} \left (\frac {1}{3} (15 a \int \tan (c+d x)dx+8 b \int \sec (c+d x) \tan (c+d x)dx)-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 3086

\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \left (15 a \int \tan (c+d x)dx+\frac {8 b \int 1d\sec (c+d x)}{d}\right )-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 24

\(\displaystyle \frac {1}{5} \left (\frac {1}{3} \left (15 a \int \tan (c+d x)dx+\frac {8 b \sec (c+d x)}{d}\right )-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )+\frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}\)

\(\Big \downarrow \) 3956

\(\displaystyle \frac {\tan ^4(c+d x) (5 a+4 b \sec (c+d x))}{20 d}+\frac {1}{5} \left (\frac {1}{3} \left (\frac {8 b \sec (c+d x)}{d}-\frac {15 a \log (\cos (c+d x))}{d}\right )-\frac {\tan ^2(c+d x) (15 a+8 b \sec (c+d x))}{6 d}\right )\)

input
Int[(a + b*Sec[c + d*x])*Tan[c + d*x]^5,x]
 
output
((5*a + 4*b*Sec[c + d*x])*Tan[c + d*x]^4)/(20*d) + (((-15*a*Log[Cos[c + d* 
x]])/d + (8*b*Sec[c + d*x])/d)/3 - ((15*a + 8*b*Sec[c + d*x])*Tan[c + d*x] 
^2)/(6*d))/5
 

3.3.57.3.1 Defintions of rubi rules used

rule 24
Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]
 

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3086
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( 
n_.), x_Symbol] :> Simp[a/f   Subst[Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2 
), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2 
] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])
 

rule 3956
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d 
*x], x]]/d, x] /; FreeQ[{c, d}, x]
 

rule 4369
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( 
a_)), x_Symbol] :> Simp[(-e)*(e*Cot[c + d*x])^(m - 1)*((a*m + b*(m - 1)*Csc 
[c + d*x])/(d*m*(m - 1))), x] - Simp[e^2/m   Int[(e*Cot[c + d*x])^(m - 2)*( 
a*m + b*(m - 1)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e}, x] && GtQ[m 
, 1]
 

rule 4372
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + 
(a_)), x_Symbol] :> Simp[a   Int[(e*Cot[c + d*x])^m, x], x] + Simp[b   Int[ 
(e*Cot[c + d*x])^m*Csc[c + d*x], x], x] /; FreeQ[{a, b, c, d, e, m}, x]
 
3.3.57.4 Maple [A] (verified)

Time = 1.10 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.80

method result size
derivativedivides \(\frac {\frac {b \sec \left (d x +c \right )^{5}}{5}+\frac {a \sec \left (d x +c \right )^{4}}{4}-\frac {2 b \sec \left (d x +c \right )^{3}}{3}-a \sec \left (d x +c \right )^{2}+b \sec \left (d x +c \right )+a \ln \left (\sec \left (d x +c \right )\right )}{d}\) \(67\)
default \(\frac {\frac {b \sec \left (d x +c \right )^{5}}{5}+\frac {a \sec \left (d x +c \right )^{4}}{4}-\frac {2 b \sec \left (d x +c \right )^{3}}{3}-a \sec \left (d x +c \right )^{2}+b \sec \left (d x +c \right )+a \ln \left (\sec \left (d x +c \right )\right )}{d}\) \(67\)
parts \(\frac {a \left (\frac {\tan \left (d x +c \right )^{4}}{4}-\frac {\tan \left (d x +c \right )^{2}}{2}+\frac {\ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}\right )}{d}+\frac {b \left (\frac {\sec \left (d x +c \right )^{5}}{5}-\frac {2 \sec \left (d x +c \right )^{3}}{3}+\sec \left (d x +c \right )\right )}{d}\) \(73\)
risch \(i a x +\frac {2 i a c}{d}+\frac {2 b \,{\mathrm e}^{9 i \left (d x +c \right )}-4 a \,{\mathrm e}^{8 i \left (d x +c \right )}+\frac {8 b \,{\mathrm e}^{7 i \left (d x +c \right )}}{3}-8 a \,{\mathrm e}^{6 i \left (d x +c \right )}+\frac {116 b \,{\mathrm e}^{5 i \left (d x +c \right )}}{15}-8 a \,{\mathrm e}^{4 i \left (d x +c \right )}+\frac {8 b \,{\mathrm e}^{3 i \left (d x +c \right )}}{3}-4 a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}-\frac {a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) \(160\)

input
int((a+b*sec(d*x+c))*tan(d*x+c)^5,x,method=_RETURNVERBOSE)
 
output
1/d*(1/5*b*sec(d*x+c)^5+1/4*a*sec(d*x+c)^4-2/3*b*sec(d*x+c)^3-a*sec(d*x+c) 
^2+b*sec(d*x+c)+a*ln(sec(d*x+c)))
 
3.3.57.5 Fricas [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.94 \[ \int (a+b \sec (c+d x)) \tan ^5(c+d x) \, dx=-\frac {60 \, a \cos \left (d x + c\right )^{5} \log \left (-\cos \left (d x + c\right )\right ) - 60 \, b \cos \left (d x + c\right )^{4} + 60 \, a \cos \left (d x + c\right )^{3} + 40 \, b \cos \left (d x + c\right )^{2} - 15 \, a \cos \left (d x + c\right ) - 12 \, b}{60 \, d \cos \left (d x + c\right )^{5}} \]

input
integrate((a+b*sec(d*x+c))*tan(d*x+c)^5,x, algorithm="fricas")
 
output
-1/60*(60*a*cos(d*x + c)^5*log(-cos(d*x + c)) - 60*b*cos(d*x + c)^4 + 60*a 
*cos(d*x + c)^3 + 40*b*cos(d*x + c)^2 - 15*a*cos(d*x + c) - 12*b)/(d*cos(d 
*x + c)^5)
 
3.3.57.6 Sympy [A] (verification not implemented)

Time = 0.40 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.33 \[ \int (a+b \sec (c+d x)) \tan ^5(c+d x) \, dx=\begin {cases} \frac {a \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {a \tan ^{4}{\left (c + d x \right )}}{4 d} - \frac {a \tan ^{2}{\left (c + d x \right )}}{2 d} + \frac {b \tan ^{4}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{5 d} - \frac {4 b \tan ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{15 d} + \frac {8 b \sec {\left (c + d x \right )}}{15 d} & \text {for}\: d \neq 0 \\x \left (a + b \sec {\left (c \right )}\right ) \tan ^{5}{\left (c \right )} & \text {otherwise} \end {cases} \]

input
integrate((a+b*sec(d*x+c))*tan(d*x+c)**5,x)
 
output
Piecewise((a*log(tan(c + d*x)**2 + 1)/(2*d) + a*tan(c + d*x)**4/(4*d) - a* 
tan(c + d*x)**2/(2*d) + b*tan(c + d*x)**4*sec(c + d*x)/(5*d) - 4*b*tan(c + 
 d*x)**2*sec(c + d*x)/(15*d) + 8*b*sec(c + d*x)/(15*d), Ne(d, 0)), (x*(a + 
 b*sec(c))*tan(c)**5, True))
 
3.3.57.7 Maxima [A] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.86 \[ \int (a+b \sec (c+d x)) \tan ^5(c+d x) \, dx=-\frac {60 \, a \log \left (\cos \left (d x + c\right )\right ) - \frac {60 \, b \cos \left (d x + c\right )^{4} - 60 \, a \cos \left (d x + c\right )^{3} - 40 \, b \cos \left (d x + c\right )^{2} + 15 \, a \cos \left (d x + c\right ) + 12 \, b}{\cos \left (d x + c\right )^{5}}}{60 \, d} \]

input
integrate((a+b*sec(d*x+c))*tan(d*x+c)^5,x, algorithm="maxima")
 
output
-1/60*(60*a*log(cos(d*x + c)) - (60*b*cos(d*x + c)^4 - 60*a*cos(d*x + c)^3 
 - 40*b*cos(d*x + c)^2 + 15*a*cos(d*x + c) + 12*b)/cos(d*x + c)^5)/d
 
3.3.57.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 248 vs. \(2 (78) = 156\).

Time = 1.53 (sec) , antiderivative size = 248, normalized size of antiderivative = 2.95 \[ \int (a+b \sec (c+d x)) \tan ^5(c+d x) \, dx=\frac {60 \, a \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right ) - 60 \, a \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right ) + \frac {137 \, a + 64 \, b + \frac {805 \, a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {320 \, b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {1970 \, a {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {640 \, b {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {1970 \, a {\left (\cos \left (d x + c\right ) - 1\right )}^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {805 \, a {\left (\cos \left (d x + c\right ) - 1\right )}^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {137 \, a {\left (\cos \left (d x + c\right ) - 1\right )}^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{{\left (\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1\right )}^{5}}}{60 \, d} \]

input
integrate((a+b*sec(d*x+c))*tan(d*x+c)^5,x, algorithm="giac")
 
output
1/60*(60*a*log(abs(-(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 1)) - 60*a*log 
(abs(-(cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 1)) + (137*a + 64*b + 805*a* 
(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 320*b*(cos(d*x + c) - 1)/(cos(d*x 
+ c) + 1) + 1970*a*(cos(d*x + c) - 1)^2/(cos(d*x + c) + 1)^2 + 640*b*(cos( 
d*x + c) - 1)^2/(cos(d*x + c) + 1)^2 + 1970*a*(cos(d*x + c) - 1)^3/(cos(d* 
x + c) + 1)^3 + 805*a*(cos(d*x + c) - 1)^4/(cos(d*x + c) + 1)^4 + 137*a*(c 
os(d*x + c) - 1)^5/(cos(d*x + c) + 1)^5)/((cos(d*x + c) - 1)/(cos(d*x + c) 
 + 1) + 1)^5)/d
 
3.3.57.9 Mupad [B] (verification not implemented)

Time = 19.03 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.93 \[ \int (a+b \sec (c+d x)) \tan ^5(c+d x) \, dx=\frac {2\,a\,\mathrm {atanh}\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}{d}-\frac {2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-10\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\left (10\,a+\frac {32\,b}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\left (-2\,a-\frac {16\,b}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {16\,b}{15}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \]

input
int(tan(c + d*x)^5*(a + b/cos(c + d*x)),x)
 
output
(2*a*atanh(tan(c/2 + (d*x)/2)^2))/d - ((16*b)/15 - tan(c/2 + (d*x)/2)^2*(2 
*a + (16*b)/3) + tan(c/2 + (d*x)/2)^4*(10*a + (32*b)/3) - 10*a*tan(c/2 + ( 
d*x)/2)^6 + 2*a*tan(c/2 + (d*x)/2)^8)/(d*(5*tan(c/2 + (d*x)/2)^2 - 10*tan( 
c/2 + (d*x)/2)^4 + 10*tan(c/2 + (d*x)/2)^6 - 5*tan(c/2 + (d*x)/2)^8 + tan( 
c/2 + (d*x)/2)^10 - 1))